package org.answer.utils;

import org.answer.pojo.BehaviorLog;

import java.text.SimpleDateFormat;
import java.util.Date;

public class BehaviorLogUtils {

    public static BehaviorLog getBehaviorLog(String username, String requestUrl, String operate){
        BehaviorLog behaviorLog = new BehaviorLog();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        behaviorLog.setOperateDate(simpleDateFormat.format(new Date()));
        behaviorLog.setUsername(username);
        behaviorLog.setRequestUrl(requestUrl);
        behaviorLog.setOperate(operate);
        return behaviorLog;
    }

}
